package com.tangbuzhi.chm.util;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

/**
 * http://git.oschina.net/tangbuzhi
 *
 * @author Tangbuzhi
 * @version V2.0
 * @Package com.tangbuzhi.chm.adapter
 * @Description: ${TODO}
 * @date: 2017/9/11
 */
public class ToastUtil {
    private static Toast sToast;

    public static void showToast(Context context, String msg) {
        if (sToast == null) {
            sToast = Toast.makeText(context, "", Toast.LENGTH_SHORT);
        }
        sToast.setText(msg);
        sToast.setGravity(Gravity.BOTTOM, 0, 200);
        sToast.show();
    }
}
